<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="xsl msxsl SCR"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SCR="http://www.CrossFactory.net/ContentManager/" >
  <!--<xsl:import href="D:\SVN\CrossFactory\SiteNote\Trunk\Spirit\_SiteNote\XmlEditor\global.xslt" />-->
  <xsl:import href="%URLGlobalXslt%" />
  <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="no" indent="yes" />

  <xsl:param name="lang"/>
  <xsl:param name="link"/>
  <xsl:param name="copyright"/>
  <xsl:param name="managingEditor"/>
  <xsl:param name="generator"/>
  <xsl:param name="ttl">1440</xsl:param>

  <xsl:template match="pagecontent">
    <rss version="2.0"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

      <channel>
        <title>
          <xsl:value-of select="pagetitle"/>
        </title>
        <link>
          <xsl:value-of select="$link"/>
        </link>
        <description>
          <xsl:value-of select="rsschanneldescription"/>
        </description>
        <xsl:if test="$lang">
          <language>
            <xsl:value-of select="$lang"/>
          </language>
        </xsl:if>
        <xsl:if test="$copyright">
          <copyright>
            <xsl:value-of select="$copyright"/>
          </copyright>
        </xsl:if>
        <xsl:if test="$managingEditor">
          <managingEditor>
            <xsl:value-of select="$managingEditor"/>
          </managingEditor>
        </xsl:if>
        <xsl:if test="$generator">
          <generator>
            <xsl:value-of select="$generator"/>
          </generator>
        </xsl:if>
        <ttl>
          <xsl:value-of select="$ttl"/>
        </ttl>

        <xsl:if test="rsschannelimageurl/text()">
          <image>
            <url>
              <xsl:value-of select="rsschannelimageurl"/>
            </url>
            <title>
              <xsl:value-of select="rsschanneltitle"/>
            </title>
            <link>
              <xsl:value-of select="rsschannelimagelink"/>
            </link>
          </image>
        </xsl:if>

        <xsl:apply-templates select="section"/>

      </channel>
    </rss>
  </xsl:template>

  <xsl:template match="section">

    <item>
      <title>
        <xsl:value-of select="sectiontitle"/>
      </title>
      <link>
        <xsl:value-of select="$link"/>
      </link>
      <description>
        CDATATagStart
        <xsl:apply-templates select="bloc|linkmore|subtitle|spacer|picture|paragraph|html|textlist|list|file|horizontalline|video|section|flash|toplink|form"/>
        CDATATagEnd
      </description>
      <!--Added by Ivan-->
      <category></category>
      <pubDate>
        <xsl:value-of select="rsspubdate"/>
      </pubDate>
      <guid>
        <xsl:value-of select="sectiontitle"/>
      </guid>
    </item>

  </xsl:template>


  <msxsl:script language="JScript" implements-prefix="SCR">

    function GetCDATATagStart()
    {
    <![CDATA[
      return '<'+'![' + 'CDATA[';
      ]]>
    }

    function GetCDATATagEnd()
    {
    return '';
    }
  </msxsl:script>


</xsl:stylesheet>
